package com.ethink.order.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.TobSaleSettlementOrderInfo;
import com.ethink.order.api.request.TobSaleSettlementOrderAddRequest;
import com.ethink.order.api.request.TobSaleSettlementOrderUpdateRequest;
import com.ethink.order.api.request.TobSaleSettlementPageQueryRequest;
import com.ethink.order.api.response.TobSaleSettlementQueryDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * TOB销售结算单 Facade接口
 *
 * @author default
 * @date 2022-11-17
 */
@FeignClient(name = "ethink-order-service", path = "order-service/facade/v1/tobSaleSettlementOrder", contextId = "tobSaleSettlementOrderFacade")
public interface TobSaleSettlementOrderFacade {

    @PostMapping("addTobSaleSettleOrder")
    @ResponseBody
    void addTobSaleSettleOrder(@RequestBody TobSaleSettlementOrderAddRequest request);

    @GetMapping("delete")
    @ResponseBody
    Integer delete(@RequestParam("id") Long id);

    @PostMapping("update")
    @ResponseBody
    Integer update(@RequestBody TobSaleSettlementOrderUpdateRequest updateRequest);

    @PostMapping("pageQuery")
    @ResponseBody
    Page<TobSaleSettlementOrderInfo> pageQuery(@RequestBody TobSaleSettlementPageQueryRequest request);

    @GetMapping("queryDetail")
    @ResponseBody
    TobSaleSettlementQueryDetailResponse queryDetail(@RequestParam("id") Long id);

    @GetMapping("matchConfirm")
    @ResponseBody
    Integer matchConfirm(@RequestParam("id") Long id);
}